You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

css-extract

Package Overview
Dependencies
Maintainers
7
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

css-extract

Extract CSS from a browserify bundle

1.3.1
Source
npmnpm
Version published
Weekly downloads
401
12.32%
Maintainers
7
Weekly downloads
 
Created
Source

css-extract stability

npm version build status test coverage downloads js-standard-style

Looks up require('insert-css') calls to extract CSS from a browserify bundle to a file. Useful with sheetify or any other package / transform that uses insert-css.

Command line

$ browserify -t sheetify/transform -p [ css-extract -o bundle.css ] index.js \
  -o bundle.js

JS api

const browserify = require('browserify')

browserify()
  .transform('sheetify/transform')
  .plugin('css-extract', { out: 'bundle.css' })
  .bundle()
const browserify = require('browserify')

browserify()
  .transform('sheetify/transform')
  .plugin('css-extract', { out: createWriteStream })
  .bundle()

function createWriteStream () {
  return process.stdout
}

Options

  • -o / --out: specify an outfile, defaults to bundle.css. Can also be a function that returns a writable stream from the JavaScript API.

Installation

$ npm install css-extract

See Also

License

MIT

Keywords

css

FAQs

Package last updated on 06 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts